#include<string>
#include<iostream>
using namespace std;

class ts1
{
public:
    ts1(int at,string b,string c)
    {
        a=at;
        s=&b;
        ss=c;
    }
    ts1(ts1 &tt1)
    {
        a=tt1.a;
        s=tt1.s;
        ss=tt1.ss;
    }

    int a;
    string *s;
    string ss;
};

int main()
{
    ts1 t1(1,"nihao","wohao");

    t1.ss="wohao+";

    //ts1 &t2=t1;

    ts1 t3(t1);

    *(t3.s)="nihao+";

    t3.ss="wohao++";

    cout<<*(t3.s)<<endl;
    cout<<t1.ss<<endl;
    //cout<<*(t1.s)<<"  "<<t1.ss<<endl;

}
